import {
  BwCustomComSoltTypeEnum,
  BwCustomComNodeAttrDataTypeEnum,
  BwCustomComNodeAttrFromTypeEnum,
  BwCustomComSlotParamDataTypeEnum,
  type BwCustomComNodeAttrModel,
  type BwCustomComNodeEnableSlotInfoModel,
} from '../../../../render/models'

const attrs: Record<string, BwCustomComNodeAttrModel> = {
  allowClear: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'true',
  },
  'autofocus\t': {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  bordered: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'true',
  },
  clearText: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'clear',
  },
  disabled: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  format: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'HH:mm:ss',
  },
  hideDisabledOptions: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  hourStep: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '1',
  },
  inputReadOnly: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  minuteStep: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '1',
  },
  open: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
  placeholder: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: '请选择时间',
  },
  placement: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.string,
    constValue: 'bottomLeft',
  },
  secondStep: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.number,
    constValue: '1',
  },
  use12Hours: {
    valueFromType: BwCustomComNodeAttrFromTypeEnum.constValue,
    valueDataType: BwCustomComNodeAttrDataTypeEnum.boolean,
    constValue: 'false',
  },
}

const slotList: Array<BwCustomComNodeEnableSlotInfoModel> = [
  {
    visible: false,
    slotType: BwCustomComSoltTypeEnum.convention,
    conventionSlotInfo: {
      slotCode: 'clearIcon',
      slotName: '自定义清除按钮插槽',
    },
  },
  {
    visible: false,
    slotType: BwCustomComSoltTypeEnum.convention,
    conventionSlotInfo: {
      slotCode: 'renderExtraFooter',
      slotName: '选择框底部显示自定义的内容',
    },
  },
  {
    visible: false,
    slotType: BwCustomComSoltTypeEnum.convention,
    conventionSlotInfo: {
      slotCode: 'suffixIcon',
      slotName: '自定义的选择框后缀图标',
    },
  },
]

export const aTimeptions = {
  attrs,
  slotList,
}
